include:
    - python3.py3


setuptools-install: 
    file.managed: #cp文件到minion端
        - name: /usr/local/src/setuptools-38.5.1.zip
        - source: salt://python3/files/setuptools-38.5.1.zip
        - user: root
        - group: root
        - mode: 644
        - unless: test -f /usr/local/src/setuptools-38.5.1.zip
    cmd.run:
        - names:
            -  cd /usr/local/src &&unzip setuptools-*.zip && cd setuptools* &&python3 setup.py  install
        - unless: test -f /usr/local/bin/pip3

pip-install:
    file.managed: #cp文件到minion端
        - name: /usr/local/src/pip-9.0.1.tar.gz
        - source: salt://python3/files/pip-9.0.1.tar.gz
        - user: root
        - group: root
        - mode: 644
        - unless: test -f /usr/local/src/pip-9.0.1.tar.gz
    cmd.run:
        - names:
            - cd /usr/local/src/ && tar zxvf /usr/local/src/pip-*tar.gz &&cd pip* && python3 setup.py  install
        - unless: test -f /usr/local/bin/pip3

